package com.mou.dto;

import com.baomidou.mybatisplus.annotation.TableField;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserDTO {
    private Integer id;
    private String nickname;
    private String username;
    private String password;
    //符合qq邮箱
    @Email(regexp = "^[a-zA-Z0-9]+@qq\\.com$")
    private String email;
    @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String phone;
    private Integer status;
    private Integer roleId;
    private String avatar;

    @TableField(exist = false)
    private String captcha;
}
